package com.hzw.saas.web.hbox.param;

import java.io.Serializable;
import javax.validation.constraints.NotBlank;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @author zzl
 * @since 02/28/2021
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel("HBox文件创建参数")
public class HBoxFilePostParam implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 空间ID, 10-个人, 20-共享
     */
    @ApiModelProperty(value = "空间ID, 10-个人", position = 1, required = true)
    @NotBlank(message = "存储空间ID不可为空")
    private String spaceId;

    /**
     * 文件所在目录ID，根目录ID为0
     */
    @ApiModelProperty(value = "文件父目录ID，特殊：0-根目录", position = 2, required = true)
    @NotBlank(message = "文件上传父目录不可为空")
    private String folderId;

    /**
     * 文件完整名称，含后缀
     */
    @ApiModelProperty(value = "文件完整名称，含后缀", position = 3, required = true)
    @NotBlank(message = "文件名不可为空")
    private String name;

    /**
     * 文件长度，单位：byte
     */
    @ApiModelProperty(value = "文件长度，单位：byte", position = 5)
    private Long length;

    /**
     * 文件摘要，MD5
     */
    @ApiModelProperty(value = "文件摘要，MD5", position = 6)
    private String digest;

    /**
     * 是否覆盖提交
     */
    @ApiModelProperty(value = "是否覆盖提交，false-存在同名文件时会返回409错误，true-存在同名文件时，会覆盖同名文件", position = 7)
    private Boolean cover;

}
